package com.sense.kukoo.biz_share.vm

import android.net.Uri
import androidx.lifecycle.MutableLiveData
import com.facebook.share.model.ShareLinkContent
import com.sense.feel.common.utils.ToastUtils
import com.sense.kukoo.biz_share.model.ShareModel
import com.sense.kukoo.common.mvvm.model.BaseMvvmModel
import com.sense.kukoo.common.mvvm.vm.BaseViewModel
import com.sense.kukoo.common.repo.bean.BookBean

class ShareViewModel:BaseViewModel() {

    private val TAG: String = javaClass.simpleName
    private lateinit var mModel: ShareModel
    private lateinit var from: BookBean
    val faceBookShare:MutableLiveData<Boolean> = MutableLiveData()
    val lineShare:MutableLiveData<Boolean> = MutableLiveData()
    val copyShare:MutableLiveData<Boolean> = MutableLiveData()


    val action_back: MutableLiveData<Boolean> = MutableLiveData()

    override fun createModel(): BaseMvvmModel {
        mModel = ShareModel()
        return mModel
    }

    override fun initData() {}

    fun initData(bean: BookBean) {
        from = bean
    }

    fun onClickFacebook(){
        faceBookShare.postValue(true)
    }

    fun onClickLine(){
        lineShare.postValue(true)
    }

    fun onClickCopyLink(){
        copyShare.postValue(true)
    }

    fun onCancel(){
        action_back.postValue(true)
    }

}